#include "stdafx.h"
#include "modules.h"
#include "command.h"

int checkout()
{
#pragma omp parallel for
	for (int n = 0; n < project().size(); n++)
	{
		string url = MixFeeds2URL(project().at(n).feeds, project().at(n).url);
		string dir = project().at(n).dir;
		string git_pull = "set WORKDIR=%CD% && cd /d " + dir + "&&" GIT " checkout " + KERNEL_SPACE().branch + "&&cd /d %WORKDIR%";
		cmd(git_pull.data());
	}
}

mod m_checkout("checkout", checkout, "checkout\tcheckout to branch");